package com.jiaomatech.doc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description: $VAL$ .<br>
 *
 * @author jm
 *     Created By 2018/12/11 下午4:50
 */
@Controller
public class HomeController {

    /**
     * 日志.
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(HomeController.class);

    @RequestMapping("/index")
    public String home(ModelMap modelMap) {
        return "index";
    }

    @RequestMapping("/index2")
    public String home2(ModelMap modelMap) {
        return "index2";
    }

    @GetMapping("/hello")
    public ResponseEntity hello() {
        return ResponseEntity.ok("Hello World");
    }

    @GetMapping("/hello2")
    public ResponseEntity hello2() {
        return ResponseEntity.ok(null);
    }
}